package it.cs.billd.pages;

import java.awt.Component;
import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

import org.eclipse.wb.swing.FocusTraversalOnArray;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class HomePage extends JFrame{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public HomePage() {
		setSize(new Dimension(800, 600));
		setTitle("BillD");
		setResizable(false);
		
		JMenuBar menuBar = new JMenuBar();
		setJMenuBar(menuBar);
		
		JMenu menu = new JMenu("Menu");
		menuBar.add(menu);
		
		JMenuItem nuovaFattura = new JMenuItem("Nuova fattura");
		nuovaFattura.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				
				HomePage.this.add(popup);
			}
		});
		menu.add(nuovaFattura);
		
		JMenuItem mntmNewMenuItem_1 = new JMenuItem("Nuovo cliente");
		menu.add(mntmNewMenuItem_1);
		
		JMenuItem cercaFattura = new JMenuItem("Cerca fattura");
		menu.add(cercaFattura);
		
		JMenuItem cercaCliente = new JMenuItem("Cerca cliente");
		menu.add(cercaCliente);
		setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{getContentPane(), menuBar, menu, nuovaFattura, mntmNewMenuItem_1, cercaFattura, cercaCliente}));
	}

}
